﻿<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>{$GetSiteName}-找朋友</title>
<link href="{$GetInstallDir}images/style.css" type=text/css rel=stylesheet>
<script src="{$GetInstallDir}ks_inc/jquery.js" type="text/javascript"></script>
<script src="{$GetInstallDir}ks_inc/common.js" type="text/javascript"></script>
<script src="{$GetInstallDir}{$GetClubInstallDir}/images/LeeSelect.js" type=text/javascript></script>
<script type="text/javascript">
		 function checkmsg()
		 {
		     var message=escape($("#message").val());
			 var username=escape($("#username").val());
			 if (username==''){
			  alert('参数传递出错!');
			  box.close();
			 }
			 if (message==''){
			   alert('请输入消息内容!');
			   $("#message").focus();
			   return false;
			 }
			 $.get("../../plus/ajaxs.asp",{action:"SendMsg",username:username,message:message},function(r){
			   r=unescape(r);
			   if (r!='success'){
				alert(r);
			   }else{
				 alert('恭喜，您的消息已发送!');
				 box.close();
			   }
			 });
         }
		 var box='';
		 function sendMsg(ev,username)
		 {
		   box=$.dialog({title:"<img src='../../images/user/mail.gif' align='absmiddle'>发送消息",content:"对方登录后可以看到您的消息(可输入255个字符)<br /><textarea name='message' id='message' style='width:340px;height:80px'></textarea><div style='text-align:center;margin:10px'><input type='button' onclick='return(checkmsg())' value=' 确 定 ' class='button'><input type='hidden' value="+username+" name='username' id='username'> <input type='button' value=' 取 消 ' onclick='box.close()' class='button'></div>"});
		  $.get("../../plus/ajaxs.asp",{action:"CheckLogin"},function(r){
		   if (r!='true'){
			 ShowLogin();
			}
		   });
		 }
        function check()
		{
		 var message=escape($("#message").val());
		 var username=escape($("#username").val());
		 if (username==''){
		  alert('参数传递出错!');
		   box.close();
		 }
		 if (message==''){
		   alert('请输入附言!');
		   $("#message").focus();
		   return false;
		 }
		 $.get("../../plus/ajaxs.asp",{action:"AddFriend",username:username,message:message},function(r){
		   r=unescape(r);
		   if (r!='success'){
		    alert(r);
		   }else{
		     alert('您的请求已发送,请等待对方的确认!');
			  box.close();
		   }
		 });
		}
		function addF(ev,username)
		{ 
		 show(ev,username);
		 var isMyFriend=false;
		 $.get("../../plus/ajaxs.asp",{action:"CheckMyFriend",username:escape(username)},function(b){
		    if (b=='nologin'){
			   box.close();
			  ShowLogin();
			}else if (b=='true'){
			   box.close();
			  alert('用户['+username+']已经是您的好友了！');
			  return false;
			 }else if(b=='verify'){
			   box.close();
			  alert('您已邀请过['+username+'],请等待对方的认证!');
			  return false;
			 }else{
			 }
		 })
		 
		}
		function show(ev,username)
		{
		  box=$.dialog({title:"<img src='../../images/user/log/106.gif'>添加好友",content:"通过对方验证才能成为好友(可输入255个字符)<br /><textarea name='message' id='message' style='width:340px;height:80px'></textarea><div style='text-align:center;margin:10px'><input type='button' onclick='return(check())' value=' 确 定 ' class='button'><input type='hidden' value="+username+" name='username' id='username'> <input type='button' value=' 取 消 ' onclick='box.close()' class='button'></div>"});
		}
		function ShowLogin()
		{
		  box=$.dialog({title:'会员登录',content:'url:../../user/userlogin.asp?Action=Poplogin',width:397,height:184});
		}	
			 
$(document).ready(function(){
  var today=new Date();
  for(i=1950;i<=today.getYear();i++){
   $("#birth_y").append("<option value='"+i+"'>"+i+"</option>");
  }
  for(i=1;i<=12;i++){
   $("#birth_m").append("<option value='"+i+"'>"+i+"</option>");
  }
  for(i=1;i<=31;i++){
   $("#birth_d").append("<option value='"+i+"'>"+i+"</option>");
  }
  $("#Province").css("width","90px");
  $("#City").css("width","70px");
  query.param=location.search.replace('?','');
  query.showload();
  query.page(1);
});
var query={
  showload:function(){
    $("#searchresult").html('<br/><br/><table cellSpacing=0 align=center cellPadding=0 border=0><tr><td vAlign=center width=427 background=images/nodate_i.gif height=122><table width="92%" align=center border=0><tr><td style="font-weight: bold; FONT-SIZE: 14px; COLOR: #ff6402" vAlign=center align=middle height=31><SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #ff6402"><img height=16 src="{$GetSiteUrl}space/friend/images/loading_16x16.gif" width=16>查找结果中。。。</SPAN></td></tr></table></td></tr></table>');
  },
  run:function()
  { this.showload();
    this.province=$('#Province').val();
	this.city=$("#City").val();
	this.county=$("#County").val();
	this.sex=$("#sex").val();
	this.birth_y=$("#birth_y").val();
	this.birth_m=$("#birth_m").val();
	this.birth_d=$("#birth_d").val();
	this.realname=$("#realname").val();
	this.param="province="+escape(this.province)+"&city="+escape(this.city)+"&county="+escape(this.County)+"&sex="+escape(this.sex)+"&birth_y="+this.birth_y+"&birth_m="+this.birth_m+"&birth_d="+this.birth_d+"&realname="+escape(this.realname);
	this.page(1);
  },
  page:function(p){ 
	  $.ajax({
	   type: "POST",
	   url: "../../plus/ajaxs.asp",
	   data: "action=SearchUser&page="+p+"&"+this.param,
	   success: function(result){
		 $("#searchresult").html(unescape(result));
	   }
	});
  }
}
</script>
<!--[if IE 6]>
<script src="{$GetInstallDir}js/iepng.js" type="text/javascript"></script>
<script type="text/javascript">
   EvPNG.fix('div, ul, img, li, input'); 
</script>
<![endif]-->
</head>
<body>
{LB_头部通用}
<div class="clear blank10"></div>
<div class="banner">{=GetAdvertise(36)}</div>

<!---start-->
<div class="demand_box">

	<div class="demand_l">
		空间分类
		<span class="orange"></span>

	</div>
	<div class="demand_r">
		<ul>
		{LB_空间分类}
		</ul>
	</div>
</div>

<div class="clear blank10"></div>
<div class="freshmainbox">
  <div class="left">
     <h3>看看哪些人在线</h3>
    <div id="searchresult"></div>
  </div>
  
  <div class="right">
       <div class="right01">
	       <h3>最新注册会员</h3>
		   <div class="right01box">
		     <ul>
			   {SQL_用户博客()}
			 </ul>
		   </div>
	   </div>
	   <div class="clear blank10"></div>
	   <div class="right01">
	       <h3>我要找朋友</h3>
		   <div class="right01box">
		       <table border="0" width="98%" align=center cellpadding=0 cellspacing=1 class="border">
								<form action="../space/friend/" method="get" name="myform" target="_blank">
									  <tr height="30" class="tdbg"> 
										<td>我要找：
										  <script src="../plus/area.asp" type="text/javascript"></script>
										</td>
									 </tr>
									 <tr>
									  <td height="30"> 性&nbsp;&nbsp;别：
											<Select id="sex" name="sex"> 
											  <Option value="" selected>-不限</Option> 
											  <Option value=男>男生</Option> 
											  <Option value=女>女生</Option>
											</Select>				
									  </td>
									  </tr>
									   <tr>
								<td width="371" height="30">出&nbsp;&nbsp;生：
					<Select id="birth_y" name="birth_y" style="width:50px"> 
					  <Option value="" selected>年</Option>
					  <option value=1950>1950</option><option value=1951>1951</option><option value=1952>1952</option><option value=1953>1953</option><option value=1954>1954</option><option value=1955>1955</option><option value=1956>1956</option><option value=1957>1957</option><option value=1958>1958</option><option value=1959>1959</option><option value=1960>1960</option><option value=1961>1961</option><option value=1962>1962</option><option value=1963>1963</option><option value=1964>1964</option><option value=1965>1965</option><option value=1966>1966</option><option value=1967>1967</option><option value=1968>1968</option><option value=1969>1969</option><option value=1970>1970</option><option value=1971>1971</option><option value=1972>1972</option><option value=1973>1973</option><option value=1974>1974</option><option value=1975>1975</option><option value=1976>1976</option><option value=1977>1977</option><option value=1978>1978</option><option value=1979>1979</option><option value=1980>1980</option><option value=1981>1981</option><option value=1982>1982</option><option value=1983>1983</option><option value=1984>1984</option><option value=1985>1985</option><option value=1986>1986</option><option value=1987>1987</option><option value=1988>1988</option><option value=1989>1989</option><option value=1990>1990</option><option value=1991>1991</option><option value=1992>1992</option><option value=1993>1993</option><option value=1994>1994</option><option value=1995>1995</option><option value=1996>1996</option><option value=1997>1997</option><option value=1998>1998</option><option value=1999>1999</option><option value=2000>2000</option><option value=2001>2001</option><option value=2002>2002</option><option value=2003>2003</option><option value=2004>2004</option><option value=2005>2005</option><option value=2006>2006</option>
					</Select> 
					<Select id="birth_m" name="birth_m" style="width:50px"> 
					  <Option value="" selected>月</Option>
						
					</Select> 
					<Select id="birth_d" name="birth_d" style="width:50px"> 
					  <Option value="" selected>日</Option>
						<option value=1>1</option><option value=2>2</option><option value=3>3</option><option value=4>4</option><option value=5>5</option><option value=6>6</option><option value=7>7</option><option value=8>8</option><option value=9>9</option><option value=10>10</option><option value=11>11</option><option value=12>12</option><option value=13>13</option><option value=14>14</option><option value=15>15</option><option value=16>16</option><option value=17>17</option><option value=18>18</option><option value=19>19</option><option value=20>20</option><option value=21>21</option><option value=22>22</option><option value=23>23</option><option value=24>24</option><option value=25>25</option><option value=26>26</option><option value=27>27</option><option value=28>28</option><option value=29>29</option><option value=30>30</option><option value=31>31</option>

					</Select></td>
					</tr>
					<tr>
					 <td> 姓名:
								<Input id="realname" size="12" name="realname" style=" margin-left:16px;"> </td>
									  </tr>
									  <tr class="tdbg"> 
										<td colspan=2 height="50" valign=middle align="center"> 
										 <button id="b1" type="submit" class="pn"> 找 朋 友</button>
										</td>
									  </tr>
							  </form>
					</table>
		   </div>
	   </div>
  </div>
</div>


<div class="clear blank10"></div>
</div>

<!--版权信息-->
 {LB_尾部通用}
<!--版权信息-->

</body>
</html>